<template>
  <!-- 平行四边形节点 -->
  <div class="parallelogram-node">
    <slot name="top" />
    <div class="node-content">
      {{ data.label }}
    </div>
    <slot name="bottom" />
  </div>
</template>

<script setup lang="ts">
interface Props {
  id: string
  data: {
    label: string
    nodeType: string
  }
}

defineProps<Props>()
</script>

<style scoped>
.parallelogram-node {
  padding: 10px 15px;
  background: #fff;
  /* border: 1px solid #000; */
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-width: 80px;
  min-height: 40px;
  /* Phase 1: 显示为矩形，但保持平行四边形的比例 */
}

.node-content {
  text-align: center;
  font-size: 12px;
  color: #000;
  font-weight: 500;
}

/* 可选：添加一个小的视觉提示表明这是平行四边形节点 */
.parallelogram-node::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  right: 8px;
  bottom: 2px;
  border: 1px solid #000;
  border-radius: 2px;
  transform: skewX(-15deg);
  pointer-events: none;
}
</style>
